﻿<WpfRibbon:RibbonWindow x:Class="DiscoveryLogic.Analytics.Studio.VisualStudioLikeShell"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:cal="clr-namespace:Microsoft.Practices.Composite.Wpf.Regions;assembly=Microsoft.Practices.Composite.Wpf"
	xmlns:Common="clr-namespace:DiscoveryLogic.Analytics.UI.Common;assembly=Analytics.UI.Common"
    xmlns:WpfRibbon="clr-namespace:DevComponents.WpfRibbon;assembly=DevComponents.WpfRibbon"
	xmlns:WpfDock="clr-namespace:DevComponents.WpfDock;assembly=DevComponents.WpfDock"
	xmlns:Readers="clr-namespace:DiscoveryLogic.Analytics.Modules.Readers;assembly=Analytics.Modules"
    Title="Network Analysis" Height="600" Width="900" ResizeMode="CanResizeWithGrip"
    Loaded="WindowLoaded" Icon="/images/networkanalysis.ico">
    <Window.Resources>
		<Style x:Key="AppMenuCommandButton" TargetType="{x:Type WpfRibbon:ButtonDropDown}">
			<Setter Property="Padding" Value ="4,2,4,2"/>
		</Style>
		<Style x:Key="AppMenuSeparator" TargetType="{x:Type Separator}">
			<Setter Property="Margin" Value ="40,0,0,0"/>
		</Style>
	</Window.Resources>
    
    <!-- commands -->
    <Window.CommandBindings>
        <CommandBinding Command="ApplicationCommands.New" CanExecute="NewCommand_CanExecute" Executed="NewCommand_Executed"/>
        <CommandBinding Command="ApplicationCommands.Save" CanExecute="SaveCommand_CanExecute" Executed="SaveCommane_Executed"/>
    </Window.CommandBindings>
    <Grid>
	    <DockPanel LastChildFill="True">
            <WpfRibbon:Ribbon 
			    DockPanel.Dock="Top" LicenseKey="DAD80300DA22" Name="AppRibbon">
			    <WpfRibbon:Ribbon.ApplicationMenu>
				    <WpfRibbon:ApplicationMenu WpfRibbon:Ribbon.KeyTip="F">
					    <WpfRibbon:ApplicationMenu.Image>
						    <Image Source="images/Component.png" Width="24" Height="24"/>
					    </WpfRibbon:ApplicationMenu.Image>
					    
					    <WpfRibbon:ApplicationMenu.AppItems>
						    <WpfRibbon:ButtonDropDown ColorClass="ButtonWithBackground" WpfRibbon:Ribbon.KeyTip="T" Command="Common:WindowCommands.Options" Header="Options">
							    <WpfRibbon:ButtonDropDown.Image>
								    <Image Source="images/Options.png" Stretch="None"/>
							    </WpfRibbon:ButtonDropDown.Image>
						    </WpfRibbon:ButtonDropDown>
						    <WpfRibbon:ButtonDropDown ColorClass="ButtonWithBackground" Margin="6,0,0,0" WpfRibbon:Ribbon.KeyTip="X" Command="ApplicationCommands.Close" Header="Exit RibbonPad">
							    <WpfRibbon:ButtonDropDown.Image>
								    <Image Source="images/Exit.png" Stretch="None"/>
							    </WpfRibbon:ButtonDropDown.Image>
						    </WpfRibbon:ButtonDropDown>
					    </WpfRibbon:ApplicationMenu.AppItems>
					    <WpfRibbon:ApplicationMenu.MruItems>
						    <TextBlock MinWidth="200" FontWeight="Bold">Recent Documents</TextBlock>
						    <Separator Padding="0"/>
						    <!--<WpfRibbon:ButtonDropDown Header="_1. ThemeAware.doc" WpfRibbon:Ribbon.KeyTip="1" Command="Common:WindowCommands.MostRecentlyUsed" CommandParameter="themeaware.doc" />
						    <WpfRibbon:ButtonDropDown Header="_2. ShortNews.doc" WpfRibbon:Ribbon.KeyTip="2" Command="Common:WindowCommands.MostRecentlyUsed" CommandParameter="shortnews.doc" />
						    <WpfRibbon:ButtonDropDown Header="_3. DevComponents.doc" WpfRibbon:Ribbon.KeyTip="3" Command="Common:WindowCommands.MostRecentlyUsed" CommandParameter="devcomponents.doc" />
						    <WpfRibbon:ButtonDropDown Header="_4. WpfRibbon.doc" WpfRibbon:Ribbon.KeyTip="4" Command="Common:WindowCommands.MostRecentlyUsed" CommandParameter="wpfribbon.doc" />-->
					    </WpfRibbon:ApplicationMenu.MruItems>
					    <WpfRibbon:ButtonDropDown Style="{DynamicResource AppMenuCommandButton}" WpfRibbon:Ribbon.KeyTip="N" Command="ApplicationCommands.New" Header="New">
						    <WpfRibbon:ButtonDropDown.Image>
							    <Image Source="images/Document32.png" Stretch="None"/>
						    </WpfRibbon:ButtonDropDown.Image>
					    </WpfRibbon:ButtonDropDown>
					    <WpfRibbon:ButtonDropDown Style="{DynamicResource AppMenuCommandButton}" WpfRibbon:Ribbon.KeyTip="O" Command="ApplicationCommands.Open" Header="Open">
						    <WpfRibbon:ButtonDropDown.Image>
							    <Image Source="images/FolderOpen32.png" Stretch="None"/>
						    </WpfRibbon:ButtonDropDown.Image>
					    </WpfRibbon:ButtonDropDown>
					    <WpfRibbon:ButtonDropDown Style="{DynamicResource AppMenuCommandButton}" WpfRibbon:Ribbon.KeyTip="S" Command="ApplicationCommands.Save" Header="Save">
						    <WpfRibbon:ButtonDropDown.Image>
							    <Image Source="images/Save32.png" Stretch="None"/>
						    </WpfRibbon:ButtonDropDown.Image>
					    </WpfRibbon:ButtonDropDown>
					    <WpfRibbon:ButtonDropDown Style="{DynamicResource AppMenuCommandButton}" WpfRibbon:Ribbon.KeyTip="A" Command="ApplicationCommands.SaveAs" Header="Save As...">
						    <WpfRibbon:ButtonDropDown.Image>
							    <Image Source="images/SaveAs32.png" Stretch="None"/>
						    </WpfRibbon:ButtonDropDown.Image>
					    </WpfRibbon:ButtonDropDown>
					    <Separator Style="{DynamicResource AppMenuSeparator}"/>
					    <WpfRibbon:ButtonDropDown Style="{DynamicResource AppMenuCommandButton}" WpfRibbon:Ribbon.KeyTip="P" Command="ApplicationCommands.Print" Header="Print...">
						    <WpfRibbon:ButtonDropDown.Image>
							    <Image Source="images/Print32.png" Stretch="None"/>
						    </WpfRibbon:ButtonDropDown.Image>
					    </WpfRibbon:ButtonDropDown>
					    <Separator Style="{DynamicResource AppMenuSeparator}"/>
					    <WpfRibbon:ButtonDropDown Style="{DynamicResource AppMenuCommandButton}" WpfRibbon:Ribbon.KeyTip="C" Command="Common:WindowCommands.CloseDocument" Header="Close">
						    <WpfRibbon:ButtonDropDown.Image>
							    <Image Source="images/FolderClosed32.png" Stretch="None"/>
						    </WpfRibbon:ButtonDropDown.Image>
					    </WpfRibbon:ButtonDropDown>
				    </WpfRibbon:ApplicationMenu>
			    </WpfRibbon:Ribbon.ApplicationMenu>

			    <WpfRibbon:Ribbon.QuickAccessToolbar>
				    <WpfRibbon:Qat>
					    <!--<WpfRibbon:ButtonDropDown Header="Save"
                            PartVisibility="ImageAndHeader" WpfRibbon:Ribbon.KeyTip="1" 
                            Command="ApplicationCommands.Save">
						    <WpfRibbon:ButtonDropDown.Image>
							    <Image Source="images/Save.png" Stretch="Fill" Width="16" Height="16"/>
						    </WpfRibbon:ButtonDropDown.Image>
					    </WpfRibbon:ButtonDropDown>-->
					    <WpfRibbon:ButtonDropDown Header="New dataset"
                            PartVisibility="ImageAndHeader"  WpfRibbon:Ribbon.KeyTip="2" 
                            Command="ApplicationCommands.New">
						    <WpfRibbon:ButtonDropDown.Image>
							    <Image Source="images/NewDocument.png" Stretch="Fill" Width="16" Height="16" />
						    </WpfRibbon:ButtonDropDown.Image>
					    </WpfRibbon:ButtonDropDown>
                        <WpfRibbon:ButtonDropDown x:Name="btnSearch" Header="Search"
                            PartVisibility="ImageAndHeader" WpfRibbon:Ribbon.KeyTip="2" Click="btnSearch_Click">
                            <WpfRibbon:ButtonDropDown.Image>
                                <Image Source="/images/search.ico" Stretch="Fill" Width="16" Height="16"/>
                            </WpfRibbon:ButtonDropDown.Image>
                        </WpfRibbon:ButtonDropDown>
                        <!--<WpfRibbon:ButtonDropDown Header="New rule"
                            PartVisibility="ImageAndHeader" WpfRibbon:Ribbon.KeyTip="2" 
                            Command="ApplicationCommands.New">
                            <WpfRibbon:ButtonDropDown.Image>
                                <Image Source="images/NewDocument.png" Stretch="Fill" Width="16" Height="16"/>
                            </WpfRibbon:ButtonDropDown.Image>
                        </WpfRibbon:ButtonDropDown>-->
                        <WpfRibbon:QatCustomizeButton />
                    </WpfRibbon:Qat>
			    </WpfRibbon:Ribbon.QuickAccessToolbar>

			    <!--<WpfRibbon:Ribbon.ContextGroups>
				    <WpfRibbon:ContextGroup Name="cgGroup1" StockColor="Green" FontSize="7.5pt">
					    Context Group
				    </WpfRibbon:ContextGroup>
			    </WpfRibbon:Ribbon.ContextGroups>-->

			    <WpfRibbon:RibbonTab x:Name="rtData" Header="Data" WpfRibbon:Ribbon.KeyTip="H">
                    <WpfRibbon:RibbonBarPanel Height="85">
                    </WpfRibbon:RibbonBarPanel>
                </WpfRibbon:RibbonTab>
			    <WpfRibbon:RibbonTab x:Name="rtRelations" Header="Relations" WpfRibbon:Ribbon.KeyTip="N" Color="Red">
                    <WpfRibbon:RibbonBarPanel Height="85">
                    </WpfRibbon:RibbonBarPanel>
			    </WpfRibbon:RibbonTab>
			    <WpfRibbon:RibbonTab x:Name="rtAnalysis" Header="Analysis" WpfRibbon:Ribbon.KeyTip="P" Color="Green">
                    <WpfRibbon:RibbonBarPanel Height="85">
                    </WpfRibbon:RibbonBarPanel>
			    </WpfRibbon:RibbonTab>
                <WpfRibbon:RibbonTab x:Name="rtReports" Header="Reports" WpfRibbon:Ribbon.KeyTip="P" Color="Orange" IsSelected="False">
                    <WpfRibbon:RibbonBarPanel Height="85">
                    </WpfRibbon:RibbonBarPanel>
                </WpfRibbon:RibbonTab>

                <WpfRibbon:ButtonDropDown Header="Help"  WpfRibbon:RibbonTabPanel.PanelAlignment="Right" PartVisibility="ImageOnly" WpfRibbon:Ribbon.KeyTip="H">
				    <WpfRibbon:ButtonDropDown.Image>
					    <Image Source="images/Help.png"/>
				    </WpfRibbon:ButtonDropDown.Image>
			    </WpfRibbon:ButtonDropDown>
		    </WpfRibbon:Ribbon>
            
		    <StatusBar Name="statusBar" DockPanel.Dock="Bottom">
			    <StatusBar.ItemsPanel>
				    <ItemsPanelTemplate>
					    <DockPanel LastChildFill="True"/>
				    </ItemsPanelTemplate>
			    </StatusBar.ItemsPanel>
			    <StatusBarItem DockPanel.Dock="Left">
				    <TextBlock x:Name="txtUser">Xiaodong Li</TextBlock>
			    </StatusBarItem>
			    <Separator DockPanel.Dock="Left"/>
                <StatusBarItem Width="18" DockPanel.Dock="Right"/>
                <StatusBarItem DockPanel.Dock="Right">
                    <ProgressBar x:Name="progressBar" Height="8" 
                                 DockPanel.Dock="Right" Width="100" Maximum="100" 
                                 Minimum="0" Value="0"/>
                </StatusBarItem>
			    <StatusBarItem DockPanel.Dock="Left">
                    <TextBlock x:Name="txtStatus">Ready</TextBlock>
			    </StatusBarItem>
            </StatusBar>
    		
		    <WpfDock:DockSite 
			    LicenseKey="DAD80300DA22" Name="AppDock" Margin="4,0,4,0" 
			    WpfDock:DockWindow.Activated="DockWindowActivated" 
			    WpfDock:DockWindow.Deactivated="DockWindowDeactivated"
			    WpfDock:DockWindow.Closing="DockWindowClosing" 
			    WpfDock:DockWindow.Closed="DockWindowClosed">
    			
			    <WpfDock:DockSite.SplitPanels>
				    <WpfDock:SplitPanel 
                        WpfDock:DockSite.Dock="Right" 
                        WpfDock:DockSite.DockSize="200">
					    <WpfDock:DockWindowGroup>
						    <WpfDock:DockWindow 
							    Header="Properties" 
							    ImageSource="images/Restrictions16.png" 
							    Name="dockProperty">
							    <ItemsControl 
								    x:Name="regionProps" 
								    cal:RegionManager.RegionName="{x:Static Common:VisualStudioLikeRegionNames.PropGridPane}"
								    Width="Auto" Height="Auto" HorizontalAlignment="Stretch" 
								    VerticalAlignment="Stretch"/>
						    </WpfDock:DockWindow>
						    <WpfDock:DockWindow 
							    Header="Query" 
							    ImageSource="images/Structure16.png" 
							    Name="dockQuery">
							    <ItemsControl 
								    x:Name="regionQuery" 
								    cal:RegionManager.RegionName="{x:Static Common:VisualStudioLikeRegionNames.QueryPane}"
								    Width="Auto" Height="Auto" HorizontalAlignment="Stretch" 
								    VerticalAlignment="Stretch"/>
						    </WpfDock:DockWindow>
						    <WpfDock:DockWindow 
							    Header="Detail" 
							    ImageSource="images/Restrictions16.png" 
							    Name="dockEntityDetail">
                                <ScrollViewer>
							        <ItemsControl 
								        x:Name="regionEntityDetail" 
								        cal:RegionManager.RegionName="EntityDetailRegion"
								        Width="Auto" Height="Auto" HorizontalAlignment="Stretch" 
								        VerticalAlignment="Stretch"/>
                                </ScrollViewer>
						    </WpfDock:DockWindow>
					    </WpfDock:DockWindowGroup>
				    </WpfDock:SplitPanel>
				    <WpfDock:SplitPanel 
                        WpfDock:DockSite.Dock="Left" 
                        WpfDock:DockSite.DockSize="240">
					    <WpfDock:DockWindowGroup>
						    <WpfDock:DockWindow 
							    Header="My Files"
							    ImageSource="images/MyFiles16.png" 
							    Name="dockMyFiles">
                                <ScrollViewer Background="White" HorizontalScrollBarVisibility="Disabled">
							        <ItemsControl 
								        x:Name="regionDataNavi" 
								        cal:RegionManager.RegionName="EntityTreeRegion"
								        HorizontalAlignment="Stretch" 
								        VerticalAlignment="Stretch"/>
                                </ScrollViewer>
						    </WpfDock:DockWindow>
						    
                            <WpfDock:DockWindow 
							    Header="Rules" 
							    ImageSource="images/MyFiles16.png" 
							    Name="dockRules">
                                <ScrollViewer Background="White">
                                    <ItemsControl 
								        x:Name="regionRule" 
								        cal:RegionManager.RegionName="RuleTreeRegion"
								        Width="Auto" Height="Auto" HorizontalAlignment="Stretch" 
								        VerticalAlignment="Stretch"/>
                                </ScrollViewer>
                            </WpfDock:DockWindow>
                        </WpfDock:DockWindowGroup>
                        <WpfDock:DockWindowGroup>
                            <WpfDock:DockWindow 
							    Header="Networks" 
							    ImageSource="images/MyFiles16.png" 
							    Name="dockNetworks">
                                <ScrollViewer Background="White" HorizontalScrollBarVisibility="Disabled">
                                    <ItemsControl 
								        x:Name="regionNetwork" 
								        cal:RegionManager.RegionName="NetworkTreeRegion"
								        HorizontalAlignment="Stretch" 
								        VerticalAlignment="Stretch"/>
                                </ScrollViewer>
                            </WpfDock:DockWindow>
                        </WpfDock:DockWindowGroup>
				    </WpfDock:SplitPanel>
                    <WpfDock:SplitPanel
                        WpfDock:DockSite.Dock="Bottom" 
                        WpfDock:DockSite.DockSize="170">
                        <WpfDock:DockWindowGroup>
                            <WpfDock:DockWindow 
							    Header="Entity list" IsAutoHide="True"
							    ImageSource="images/Restrictions16.png" 
							    Name="dockEntityList">
                                <ScrollViewer>
                                    <ItemsControl 
								        x:Name="regionEntityList" 
								        cal:RegionManager.RegionName="EntityListRegion"
								        Width="Auto" Height="Auto" HorizontalAlignment="Stretch" 
								        VerticalAlignment="Stretch"/>
                                </ScrollViewer>
                            </WpfDock:DockWindow>
                            <WpfDock:DockWindow 
							    Header="Relations" IsAutoHide="True"
							    ImageSource="images/Restrictions16.png" 
							    Name="dockLinks">
                                <ItemsControl 
								    x:Name="regionLinks" 
								    cal:RegionManager.RegionName="LinksRegion"
								    Width="Auto" Height="Auto" HorizontalAlignment="Stretch" 
								    VerticalAlignment="Stretch"/>
                            </WpfDock:DockWindow>
                        </WpfDock:DockWindowGroup>
                    </WpfDock:SplitPanel>
			    </WpfDock:DockSite.SplitPanels>

                <WpfDock:SplitPanel x:Name="tabDocContainer">
                    <WpfDock:DockWindowGroup>
                        <WpfDock:DockWindow 
                                CanDockLeft="False"
                                CanDockRight="False"
                                CanDockTop="False"
                                CanDockBottom="False"
                                CanFloat="False"
                                Header="User Guide"
                                Description=""
                                Name="tabWelcome"
                                CanClose="False"
                                CloseButtonVisibility="Hidden">
                            <Readers:DocReader x:Name="docReader"/>
                        </WpfDock:DockWindow>
                        <!--<WpfDock:DockWindow 
                                CanDockLeft="False"
                                CanDockRight="False"
                                CanDockTop="False"
                                CanDockBottom="False"
                                CanFloat="False"
                                Header="Network data"
                                Description=""
                                Name="tabNetData"
                                CanClose="True"
                                CloseButtonVisibility="Hidden">
                            <ContentControl 
                                cal:RegionManager.RegionName="NetworkDataRegion"
                                Width="Auto" Height="Auto" HorizontalAlignment="Stretch" 
                                VerticalAlignment="Stretch"/>
                        </WpfDock:DockWindow>
                        <WpfDock:DockWindow 
                                CanDockLeft="False"
                                CanDockRight="False"
                                CanDockTop="False"
                                CanDockBottom="False"
                                CanFloat="False"
                                Header="Network stats"
                                Description=""
                                Name="dockNetStats"
                                CanClose="True"
                                CloseButtonVisibility="Hidden">
                            <ContentControl 
                                cal:RegionManager.RegionName="NetworkStatsRegion"
                                Width="Auto" Height="Auto" HorizontalAlignment="Stretch" 
                                VerticalAlignment="Stretch"/>
                        </WpfDock:DockWindow>
                        <WpfDock:DockWindow 
                                CanDockLeft="False"
                                CanDockRight="False"
                                CanDockTop="False"
                                CanDockBottom="False"
                                CanFloat="False"
                                Header="Network graph"
                                Description=""
                                Name="dockNetworkGraph"
                                CanClose="True"
                                CloseButtonVisibility="Hidden">
                            <ContentControl 
                                cal:RegionManager.RegionName="NetworkGraphRegion"
                                Width="Auto" Height="Auto" HorizontalAlignment="Stretch" 
                                VerticalAlignment="Stretch"/>
                        </WpfDock:DockWindow>
                        <WpfDock:DockWindow 
                                CanDockLeft="False"
                                CanDockRight="False"
                                CanDockTop="False"
                                CanDockBottom="False"
                                CanFloat="False"
                                Header="Gravity graph"
                                Description=""
                                Name="dockGravityGraph"
                                CanClose="True"
                                CloseButtonVisibility="Hidden">
                            <ContentControl 
                                cal:RegionManager.RegionName="GravityGraphRegion"
                                Width="Auto" Height="Auto" HorizontalAlignment="Stretch" 
                                VerticalAlignment="Stretch"/>
                        </WpfDock:DockWindow>
                        <WpfDock:DockWindow 
                                CanDockLeft="False"
                                CanDockRight="False"
                                CanDockTop="False"
                                CanDockBottom="False"
                                CanFloat="False"
                                Header="Radial graph"
                                Description=""
                                Name="dockRadialGraph"
                                CanClose="True"
                                CloseButtonVisibility="Hidden">
                            <ContentControl 
                                cal:RegionManager.RegionName="RadialGraphRegion"
                                Width="Auto" Height="Auto" HorizontalAlignment="Stretch" 
                                VerticalAlignment="Stretch"/>
                        </WpfDock:DockWindow>-->
                    </WpfDock:DockWindowGroup>
                    
                </WpfDock:SplitPanel>
            </WpfDock:DockSite>
	    </DockPanel>
        <Popup x:Name="popup" AllowsTransparency="True" IsOpen="False" StaysOpen="False">
            <Viewbox>
                <Border CornerRadius="10" Background="DarkGray">
                    <ContentControl 
                        x:Name="popupContainer" 
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch"/>
                </Border> 
            </Viewbox>
        </Popup>
    </Grid>
</WpfRibbon:RibbonWindow>
